package com.panasonic.cn.cmsc;

import java.io.*;
import java.lang.*;
import java.util.*;
import java.math.*;
import java.sql.SQLException;
import com.fujitsu.fks.jaaf.core.*;

public class SQLMdlno{
	private Hashtable paramsString     = new Hashtable();
	private Hashtable paramsBigDecimal = new Hashtable();
	private Hashtable paramsFree       = new Hashtable();
	private String lastSql_ = null;

	private String getString(String name){
		if(name==null) return "";
		String returnStr = (String)paramsString.get(name);
		if(returnStr==null) return "";
		return "'"+FrameworkCommon.stringReplaceSQuote(returnStr)+"'";
	}

	private String getBigDecimal(String name){
		if(name==null) return "";
		BigDecimal returnStr = (BigDecimal)paramsBigDecimal.get(name);
		if(returnStr==null) return "";
		return returnStr.toString();
	}

	private String getFree(String name){
		if(name==null) return "";
		String returnStr = (String)paramsFree.get(name);
		if(returnStr==null) return "";
		return returnStr;
	}

	public String getLastSql(){
		return lastSql_;
	}

	public SelectResultRset SELECT_MDLNO01_1(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	TRIM(NVL(UNI_ITM_NO    ,'')) AS UNI_ITM_NO    ,");
		sql.append("	TRIM(NVL(U_I_NO_DSTC_CD,'')) AS U_I_NO_DSTC_CD,");
		sql.append("	TRIM(NVL(APL_BDT       ,'')) AS APL_BDT       ,");
		sql.append("	TRIM(NVL(AC_END_DT     ,'')) AS AC_END_DT     ,");
		sql.append("	TRIM(NVL(DCAT_CD       ,'')) AS DCAT_CD       ,");
		sql.append("	TRIM(NVL(TMP_AC_TYP    ,'')) AS TMP_AC_TYP    ,");
		sql.append("	TRIM(NVL(A_NOIG_DVSN_CD,'')) AS A_NOIG_DVSN_CD,");
		sql.append("	TRIM(NVL(M_PRNT_DVSN_CD,'')) AS M_PRNT_DVSN_CD,");
		sql.append("	TRIM(NVL(RGS_PGM_NM    ,'')) AS RGS_PGM_NM    ,");
		sql.append("	TRIM(NVL(RGS_USR_ID    ,'')) AS RGS_USR_ID    ,");
		sql.append("	TO_CHAR(NVL(RGS_DTTM,''),'YYYYMMDDHH24MISS') AS RGS_DTTM      ,");
		sql.append("	TRIM(NVL(CHG_PGM_NM    ,'')) AS CHG_PGM_NM    ,");
		sql.append("	TRIM(NVL(CHG_USR_ID    ,'')) AS CHG_USR_ID    ,");
		sql.append("	TO_CHAR(NVL(CHG_DTTM,''),'YYYYMMDDHH24MISS') AS CHG_DTTM      ,");
		sql.append("	TRIM(NVL(CHG_TMS       ,'')) AS CHG_TMS    ");
		sql.append("	FROM MDLNO");
		sql.append("	WHERE DEL_TYP <>1");
		sql.append("	AND APL_BDT <"+((getString("SYS_DATE").equals(""))?" is null ":"=")+getString("SYS_DATE")+" ");
		sql.append("	AND AC_END_DT >"+((getString("SYS_DATE").equals(""))?" is null ":"=")+getString("SYS_DATE")+"");
		sql.append("	AND ROWNUM <"+((getString("MAX_KENSU").equals(""))?" is null ":"=")+getString("MAX_KENSU")+"");
		sql.append("	ORDER BY UNI_ITM_NO");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_MDLNO01_2(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	TRIM(NVL(UNI_ITM_NO    ,'')) AS UNI_ITM_NO    ,");
		sql.append("	TRIM(NVL(U_I_NO_DSTC_CD,'')) AS U_I_NO_DSTC_CD,");
		sql.append("	TRIM(NVL(APL_BDT       ,'')) AS APL_BDT       ,");
		sql.append("	TRIM(NVL(AC_END_DT     ,'')) AS AC_END_DT     ,");
		sql.append("	TRIM(NVL(DCAT_CD       ,'')) AS DCAT_CD       ,");
		sql.append("	TRIM(NVL(TMP_AC_TYP    ,'')) AS TMP_AC_TYP    ,");
		sql.append("	TRIM(NVL(A_NOIG_DVSN_CD,'')) AS A_NOIG_DVSN_CD,");
		sql.append("	TRIM(NVL(M_PRNT_DVSN_CD,'')) AS M_PRNT_DVSN_CD,");
		sql.append("	TRIM(NVL(RGS_PGM_NM    ,'')) AS RGS_PGM_NM    ,");
		sql.append("	TRIM(NVL(RGS_USR_ID    ,'')) AS RGS_USR_ID    ,");
		sql.append("	TO_CHAR(NVL(RGS_DTTM,''),'YYYYMMDDHH24MISS') AS RGS_DTTM      ,");
		sql.append("	TRIM(NVL(CHG_PGM_NM    ,'')) AS CHG_PGM_NM    ,");
		sql.append("	TRIM(NVL(CHG_USR_ID    ,'')) AS CHG_USR_ID    ,");
		sql.append("	TO_CHAR(NVL(CHG_DTTM,''),'YYYYMMDDHH24MISS') AS CHG_DTTM      ,");
		sql.append("	TRIM(NVL(CHG_TMS       ,'')) AS CHG_TMS    ");
		sql.append("	FROM MDLNO");
		sql.append("	WHERE DEL_TYP <>1");
		sql.append("	AND APL_BDT <"+((getString("SYS_DATE").equals(""))?" is null ":"=")+getString("SYS_DATE")+" ");
		sql.append("	AND AC_END_DT >"+((getString("SYS_DATE").equals(""))?" is null ":"=")+getString("SYS_DATE")+" ");
		sql.append("	AND UNI_ITM_NO LIKE "+getString("GCS_CD")+"");
		sql.append("	AND ROWNUM <"+((getString("MAX_KENSU").equals(""))?" is null ":"=")+getString("MAX_KENSU")+"");
		sql.append("	ORDER BY UNI_ITM_NO");
		sql.append("	");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_MDLNO02_1(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	TRIM(NVL(UNI_ITM_NO    ,'')) AS UNI_ITM_NO    ,");
		sql.append("	TRIM(NVL(U_I_NO_DSTC_CD,'')) AS U_I_NO_DSTC_CD,");
		sql.append("	TRIM(NVL(APL_BDT       ,'')) AS APL_BDT       ,");
		sql.append("	TRIM(NVL(AC_END_DT     ,'')) AS AC_END_DT     ,");
		sql.append("	TRIM(NVL(DCAT_CD       ,'')) AS DCAT_CD       ,");
		sql.append("	TRIM(NVL(TMP_AC_TYP    ,'')) AS TMP_AC_TYP    ,");
		sql.append("	TRIM(NVL(A_NOIG_DVSN_CD,'')) AS A_NOIG_DVSN_CD,");
		sql.append("	TRIM(NVL(M_PRNT_DVSN_CD,'')) AS M_PRNT_DVSN_CD,");
		sql.append("	TRIM(NVL(RGS_PGM_NM    ,'')) AS RGS_PGM_NM    ,");
		sql.append("	TRIM(NVL(RGS_USR_ID    ,'')) AS RGS_USR_ID    ,");
		sql.append("	TO_CHAR(NVL(RGS_DTTM,''),'YYYYMMDDHH24MISS') AS RGS_DTTM      ,");
		sql.append("	TRIM(NVL(CHG_PGM_NM    ,'')) AS CHG_PGM_NM    ,");
		sql.append("	TRIM(NVL(CHG_USR_ID    ,'')) AS CHG_USR_ID    ,");
		sql.append("	TO_CHAR(NVL(CHG_DTTM,''),'YYYYMMDDHH24MISS') AS CHG_DTTM      ,");
		sql.append("	TRIM(NVL(CHG_TMS       ,'')) AS CHG_TMS    ");
		sql.append("	FROM MDLNO");
		sql.append("	WHERE DEL_TYP <>1");
		sql.append("	AND APL_BDT > "+getString("SYS_DATE")+" ");
		sql.append("	AND ROWNUM <"+((getString("MAX_KENSU").equals(""))?" is null ":"=")+getString("MAX_KENSU")+"");
		sql.append("	ORDER BY UNI_ITM_NO");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_MDLNO02_2(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	TRIM(NVL(UNI_ITM_NO    ,'')) AS UNI_ITM_NO    ,");
		sql.append("	TRIM(NVL(U_I_NO_DSTC_CD,'')) AS U_I_NO_DSTC_CD,");
		sql.append("	TRIM(NVL(APL_BDT       ,'')) AS APL_BDT       ,");
		sql.append("	TRIM(NVL(AC_END_DT     ,'')) AS AC_END_DT     ,");
		sql.append("	TRIM(NVL(DCAT_CD       ,'')) AS DCAT_CD       ,");
		sql.append("	TRIM(NVL(TMP_AC_TYP    ,'')) AS TMP_AC_TYP    ,");
		sql.append("	TRIM(NVL(A_NOIG_DVSN_CD,'')) AS A_NOIG_DVSN_CD,");
		sql.append("	TRIM(NVL(M_PRNT_DVSN_CD,'')) AS M_PRNT_DVSN_CD,");
		sql.append("	TRIM(NVL(RGS_PGM_NM    ,'')) AS RGS_PGM_NM    ,");
		sql.append("	TRIM(NVL(RGS_USR_ID    ,'')) AS RGS_USR_ID    ,");
		sql.append("	TO_CHAR(NVL(RGS_DTTM,''),'YYYYMMDDHH24MISS') AS RGS_DTTM      ,");
		sql.append("	TRIM(NVL(CHG_PGM_NM    ,'')) AS CHG_PGM_NM    ,");
		sql.append("	TRIM(NVL(CHG_USR_ID    ,'')) AS CHG_USR_ID    ,");
		sql.append("	TO_CHAR(NVL(CHG_DTTM,''),'YYYYMMDDHH24MISS') AS CHG_DTTM      ,");
		sql.append("	TRIM(NVL(CHG_TMS       ,'')) AS CHG_TMS    ");
		sql.append("	FROM MDLNO");
		sql.append("	WHERE DEL_TYP <>1");
		sql.append("	AND APL_BDT > "+getString("SYS_DATE")+" ");
		sql.append("	AND UNI_ITM_NO LIKE "+getString("GCS_CD")+"");
		sql.append("	AND ROWNUM <"+((getString("MAX_KENSU").equals(""))?" is null ":"=")+getString("MAX_KENSU")+"");
		sql.append("	ORDER BY UNI_ITM_NO");
		sql.append("	");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_MDLNO03_1(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	TRIM(NVL(UNI_ITM_NO    ,'')) AS UNI_ITM_NO    ,");
		sql.append("	TRIM(NVL(U_I_NO_DSTC_CD,'')) AS U_I_NO_DSTC_CD,");
		sql.append("	TRIM(NVL(APL_BDT       ,'')) AS APL_BDT       ,");
		sql.append("	TRIM(NVL(AC_END_DT     ,'')) AS AC_END_DT     ,");
		sql.append("	TRIM(NVL(DCAT_CD       ,'')) AS DCAT_CD       ,");
		sql.append("	TRIM(NVL(TMP_AC_TYP    ,'')) AS TMP_AC_TYP    ,");
		sql.append("	TRIM(NVL(A_NOIG_DVSN_CD,'')) AS A_NOIG_DVSN_CD,");
		sql.append("	TRIM(NVL(M_PRNT_DVSN_CD,'')) AS M_PRNT_DVSN_CD,");
		sql.append("	TRIM(NVL(RGS_PGM_NM    ,'')) AS RGS_PGM_NM    ,");
		sql.append("	TRIM(NVL(RGS_USR_ID    ,'')) AS RGS_USR_ID    ,");
		sql.append("	TO_CHAR(NVL(RGS_DTTM,''),'YYYYMMDDHH24MISS') AS RGS_DTTM      ,");
		sql.append("	TRIM(NVL(CHG_PGM_NM    ,'')) AS CHG_PGM_NM    ,");
		sql.append("	TRIM(NVL(CHG_USR_ID    ,'')) AS CHG_USR_ID    ,");
		sql.append("	TO_CHAR(NVL(CHG_DTTM,''),'YYYYMMDDHH24MISS') AS CHG_DTTM      ,");
		sql.append("	TRIM(NVL(CHG_TMS       ,'')) AS CHG_TMS    ");
		sql.append("	FROM MDLNO");
		sql.append("	WHERE DEL_TYP <>1");
		sql.append("	AND ROWNUM <"+((getString("MAX_KENSU").equals(""))?" is null ":"=")+getString("MAX_KENSU")+"");
		sql.append("	ORDER BY UNI_ITM_NO");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_MDLNO03_2(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	TRIM(NVL(UNI_ITM_NO    ,'')) AS UNI_ITM_NO    ,");
		sql.append("	TRIM(NVL(U_I_NO_DSTC_CD,'')) AS U_I_NO_DSTC_CD,");
		sql.append("	TRIM(NVL(APL_BDT       ,'')) AS APL_BDT       ,");
		sql.append("	TRIM(NVL(AC_END_DT     ,'')) AS AC_END_DT     ,");
		sql.append("	TRIM(NVL(DCAT_CD       ,'')) AS DCAT_CD       ,");
		sql.append("	TRIM(NVL(TMP_AC_TYP    ,'')) AS TMP_AC_TYP    ,");
		sql.append("	TRIM(NVL(A_NOIG_DVSN_CD,'')) AS A_NOIG_DVSN_CD,");
		sql.append("	TRIM(NVL(M_PRNT_DVSN_CD,'')) AS M_PRNT_DVSN_CD,");
		sql.append("	TRIM(NVL(RGS_PGM_NM    ,'')) AS RGS_PGM_NM    ,");
		sql.append("	TRIM(NVL(RGS_USR_ID    ,'')) AS RGS_USR_ID    ,");
		sql.append("	TO_CHAR(NVL(RGS_DTTM,''),'YYYYMMDDHH24MISS') AS RGS_DTTM      ,");
		sql.append("	TRIM(NVL(CHG_PGM_NM    ,'')) AS CHG_PGM_NM    ,");
		sql.append("	TRIM(NVL(CHG_USR_ID    ,'')) AS CHG_USR_ID    ,");
		sql.append("	TO_CHAR(NVL(CHG_DTTM,''),'YYYYMMDDHH24MISS') AS CHG_DTTM      ,");
		sql.append("	TRIM(NVL(CHG_TMS       ,'')) AS CHG_TMS    ");
		sql.append("	FROM MDLNO");
		sql.append("	WHERE DEL_TYP <>1");
		sql.append("	AND UNI_ITM_NO LIKE "+getString("GCS_CD")+"");
		sql.append("	AND ROWNUM <"+((getString("MAX_KENSU").equals(""))?" is null ":"=")+getString("MAX_KENSU")+"");
		sql.append("	ORDER BY UNI_ITM_NO");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_MDLNO04_1(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	TRIM(NVL(UNI_ITM_NO    ,'')) AS UNI_ITM_NO    ,");
		sql.append("	TRIM(NVL(U_I_NO_DSTC_CD,'')) AS U_I_NO_DSTC_CD,");
		sql.append("	TRIM(NVL(APL_BDT       ,'')) AS APL_BDT       ,");
		sql.append("	TRIM(NVL(AC_END_DT     ,'')) AS AC_END_DT     ,");
		sql.append("	TRIM(NVL(DCAT_CD       ,'')) AS DCAT_CD       ,");
		sql.append("	TRIM(NVL(TMP_AC_TYP    ,'')) AS TMP_AC_TYP    ,");
		sql.append("	TRIM(NVL(A_NOIG_DVSN_CD,'')) AS A_NOIG_DVSN_CD,");
		sql.append("	TRIM(NVL(M_PRNT_DVSN_CD,'')) AS M_PRNT_DVSN_CD,");
		sql.append("	TRIM(NVL(RGS_PGM_NM    ,'')) AS RGS_PGM_NM    ,");
		sql.append("	TRIM(NVL(RGS_USR_ID    ,'')) AS RGS_USR_ID    ,");
		sql.append("	TO_CHAR(NVL(RGS_DTTM,''),'YYYYMMDDHH24MISS') AS RGS_DTTM      ,");
		sql.append("	TRIM(NVL(CHG_PGM_NM    ,'')) AS CHG_PGM_NM    ,");
		sql.append("	TRIM(NVL(CHG_USR_ID    ,'')) AS CHG_USR_ID    ,");
		sql.append("	TO_CHAR(NVL(CHG_DTTM,''),'YYYYMMDDHH24MISS') AS CHG_DTTM      ,");
		sql.append("	TRIM(NVL(CHG_TMS       ,'')) AS CHG_TMS    ");
		sql.append("	FROM MDLNO");
		sql.append("	WHERE DEL_TYP = 1");
		sql.append("	AND AC_END_DT < "+getString("SYS_DATE")+" ");
		sql.append("	AND ROWNUM <"+((getString("MAX_KENSU").equals(""))?" is null ":"=")+getString("MAX_KENSU")+"");
		sql.append("	ORDER BY UNI_ITM_NO");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_MDLNO04_2(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	TRIM(NVL(UNI_ITM_NO    ,'')) AS UNI_ITM_NO    ,");
		sql.append("	TRIM(NVL(U_I_NO_DSTC_CD,'')) AS U_I_NO_DSTC_CD,");
		sql.append("	TRIM(NVL(APL_BDT       ,'')) AS APL_BDT       ,");
		sql.append("	TRIM(NVL(AC_END_DT     ,'')) AS AC_END_DT     ,");
		sql.append("	TRIM(NVL(DCAT_CD       ,'')) AS DCAT_CD       ,");
		sql.append("	TRIM(NVL(TMP_AC_TYP    ,'')) AS TMP_AC_TYP    ,");
		sql.append("	TRIM(NVL(A_NOIG_DVSN_CD,'')) AS A_NOIG_DVSN_CD,");
		sql.append("	TRIM(NVL(M_PRNT_DVSN_CD,'')) AS M_PRNT_DVSN_CD,");
		sql.append("	TRIM(NVL(RGS_PGM_NM    ,'')) AS RGS_PGM_NM    ,");
		sql.append("	TRIM(NVL(RGS_USR_ID    ,'')) AS RGS_USR_ID    ,");
		sql.append("	TO_CHAR(NVL(RGS_DTTM,''),'YYYYMMDDHH24MISS') AS RGS_DTTM      ,");
		sql.append("	TRIM(NVL(CHG_PGM_NM    ,'')) AS CHG_PGM_NM    ,");
		sql.append("	TRIM(NVL(CHG_USR_ID    ,'')) AS CHG_USR_ID    ,");
		sql.append("	TO_CHAR(NVL(CHG_DTTM,''),'YYYYMMDDHH24MISS') AS CHG_DTTM      ,");
		sql.append("	TRIM(NVL(CHG_TMS       ,'')) AS CHG_TMS    ");
		sql.append("	FROM MDLNO");
		sql.append("	WHERE DEL_TYP = 1");
		sql.append("	AND AC_END_DT < "+getString("SYS_DATE")+" ");
		sql.append("	AND UNI_ITM_NO LIKE "+getString("GCS_CD")+"");
		sql.append("	AND ROWNUM <"+((getString("MAX_KENSU").equals(""))?" is null ":"=")+getString("MAX_KENSU")+"");
		sql.append("	ORDER BY UNI_ITM_NO");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_FLATC01_1(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	TRIM(NVL(FLT_CD       ,'')) AS FLT_CD        ,");
		sql.append("	TRIM(NVL(APL_BDT      ,'')) AS APL_BDT       ,");
		sql.append("	TRIM(NVL(AC_END_DT    ,'')) AS AC_END_DT     ,");
		sql.append("	TRIM(NVL(TMP_AC_TYP   ,'')) AS TMP_AC_TYP    ,");
		sql.append("	TRIM(NVL(CTRL_DVSN_CD ,'')) AS CTRL_DVSN_CD  ,");
		sql.append("	TRIM(NVL(CTRL_RGN_TYP ,'')) AS CTRL_RGN_TYP  ,");
		sql.append("	TRIM(NVL(TRPT_CLSS_TYP,'')) AS TRPT_CLSS_TYP ,");
		sql.append("	TRIM(NVL(TRPT_ENGL_NM ,'')) AS TRPT_ENGL_NM  ,");
		sql.append("	TRIM(NVL(TRPT_ENGL_AB ,'')) AS TRPT_ENGL_AB  ,");
		sql.append("	TRIM(NVL(TRPT_ENGL_ADR,'')) AS TRPT_ENGL_ADR ,");
		sql.append("	TRIM(NVL(TEL_NO       ,'')) AS TEL_NO        ,");
		sql.append("	TRIM(NVL(FAX_NO       ,'')) AS FAX_NO        ,");
		sql.append("	TRIM(NVL(RGS_PGM_NM   ,'')) AS RGS_PGM_NM    ,");
		sql.append("	TRIM(NVL(RGS_USR_ID   ,'')) AS RGS_USR_ID    ,");
		sql.append("	TO_CHAR(NVL(RGS_DTTM,''),'YYYYMMDDHH24MISS') AS RGS_DTTM,");
		sql.append("	TRIM(NVL(CHG_PGM_NM   ,'')) AS CHG_PGM_NM    ,");
		sql.append("	TRIM(NVL(CHG_USR_ID   ,'')) AS CHG_USR_ID    ,");
		sql.append("	TO_CHAR(NVL(CHG_DTTM,''),'YYYYMMDDHH24MISS') AS CHG_DTTM,");
		sql.append("	TRIM(NVL(CHG_TMS      ,'')) AS CHG_TMS         ");
		sql.append("	FROM FLATC");
		sql.append("	WHERE DEL_TYP <>1");
		sql.append("	AND APL_BDT <"+((getString("SYS_DATE").equals(""))?" is null ":"=")+getString("SYS_DATE")+" ");
		sql.append("	AND AC_END_DT >"+((getString("SYS_DATE").equals(""))?" is null ":"=")+getString("SYS_DATE")+" ");
		sql.append("	AND ROWNUM <"+((getString("MAX_KENSU").equals(""))?" is null ":"=")+getString("MAX_KENSU")+"");
		sql.append("	ORDER BY FLT_CD");
		sql.append("	");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_FLATC01_2(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	TRIM(NVL(FLT_CD       ,'')) AS FLT_CD        ,");
		sql.append("	TRIM(NVL(APL_BDT      ,'')) AS APL_BDT       ,");
		sql.append("	TRIM(NVL(AC_END_DT    ,'')) AS AC_END_DT     ,");
		sql.append("	TRIM(NVL(TMP_AC_TYP   ,'')) AS TMP_AC_TYP    ,");
		sql.append("	TRIM(NVL(CTRL_DVSN_CD ,'')) AS CTRL_DVSN_CD  ,");
		sql.append("	TRIM(NVL(CTRL_RGN_TYP ,'')) AS CTRL_RGN_TYP  ,");
		sql.append("	TRIM(NVL(TRPT_CLSS_TYP,'')) AS TRPT_CLSS_TYP ,");
		sql.append("	TRIM(NVL(TRPT_ENGL_NM ,'')) AS TRPT_ENGL_NM  ,");
		sql.append("	TRIM(NVL(TRPT_ENGL_AB ,'')) AS TRPT_ENGL_AB  ,");
		sql.append("	TRIM(NVL(TRPT_ENGL_ADR,'')) AS TRPT_ENGL_ADR ,");
		sql.append("	TRIM(NVL(TEL_NO       ,'')) AS TEL_NO        ,");
		sql.append("	TRIM(NVL(FAX_NO       ,'')) AS FAX_NO        ,");
		sql.append("	TRIM(NVL(RGS_PGM_NM   ,'')) AS RGS_PGM_NM    ,");
		sql.append("	TRIM(NVL(RGS_USR_ID   ,'')) AS RGS_USR_ID    ,");
		sql.append("	TO_CHAR(NVL(RGS_DTTM,''),'YYYYMMDDHH24MISS') AS RGS_DTTM,");
		sql.append("	TRIM(NVL(CHG_PGM_NM   ,'')) AS CHG_PGM_NM    ,");
		sql.append("	TRIM(NVL(CHG_USR_ID   ,'')) AS CHG_USR_ID    ,");
		sql.append("	TO_CHAR(NVL(CHG_DTTM,''),'YYYYMMDDHH24MISS') AS CHG_DTTM,");
		sql.append("	TRIM(NVL(CHG_TMS      ,'')) AS CHG_TMS    ");
		sql.append("	FROM FLATC");
		sql.append("	WHERE DEL_TYP <>1");
		sql.append("	AND APL_BDT <"+((getString("SYS_DATE").equals(""))?" is null ":"=")+getString("SYS_DATE")+" ");
		sql.append("	AND AC_END_DT >"+((getString("SYS_DATE").equals(""))?" is null ":"=")+getString("SYS_DATE")+" ");
		sql.append("	AND FLT_CD LIKE "+getString("GCS_CD")+"");
		sql.append("	AND ROWNUM <"+((getString("MAX_KENSU").equals(""))?" is null ":"=")+getString("MAX_KENSU")+"");
		sql.append("	ORDER BY FLT_CD");
		sql.append("	");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_FLATC02_1(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	TRIM(NVL(FLT_CD       ,'')) AS FLT_CD        ,");
		sql.append("	TRIM(NVL(APL_BDT      ,'')) AS APL_BDT       ,");
		sql.append("	TRIM(NVL(AC_END_DT    ,'')) AS AC_END_DT     ,");
		sql.append("	TRIM(NVL(TMP_AC_TYP   ,'')) AS TMP_AC_TYP    ,");
		sql.append("	TRIM(NVL(CTRL_DVSN_CD ,'')) AS CTRL_DVSN_CD  ,");
		sql.append("	TRIM(NVL(CTRL_RGN_TYP ,'')) AS CTRL_RGN_TYP  ,");
		sql.append("	TRIM(NVL(TRPT_CLSS_TYP,'')) AS TRPT_CLSS_TYP ,");
		sql.append("	TRIM(NVL(TRPT_ENGL_NM ,'')) AS TRPT_ENGL_NM  ,");
		sql.append("	TRIM(NVL(TRPT_ENGL_AB ,'')) AS TRPT_ENGL_AB  ,");
		sql.append("	TRIM(NVL(TRPT_ENGL_ADR,'')) AS TRPT_ENGL_ADR ,");
		sql.append("	TRIM(NVL(TEL_NO       ,'')) AS TEL_NO        ,");
		sql.append("	TRIM(NVL(FAX_NO       ,'')) AS FAX_NO        ,");
		sql.append("	TRIM(NVL(RGS_PGM_NM   ,'')) AS RGS_PGM_NM    ,");
		sql.append("	TRIM(NVL(RGS_USR_ID   ,'')) AS RGS_USR_ID    ,");
		sql.append("	TO_CHAR(NVL(RGS_DTTM,''),'YYYYMMDDHH24MISS') AS RGS_DTTM,");
		sql.append("	TRIM(NVL(CHG_PGM_NM   ,'')) AS CHG_PGM_NM    ,");
		sql.append("	TRIM(NVL(CHG_USR_ID   ,'')) AS CHG_USR_ID    ,");
		sql.append("	TO_CHAR(NVL(CHG_DTTM,''),'YYYYMMDDHH24MISS') AS CHG_DTTM,");
		sql.append("	TRIM(NVL(CHG_TMS      ,'')) AS CHG_TMS         ");
		sql.append("	FROM FLATC");
		sql.append("	WHERE DEL_TYP <>1");
		sql.append("	AND APL_BDT > "+getString("SYS_DATE")+" ");
		sql.append("	AND ROWNUM <"+((getString("MAX_KENSU").equals(""))?" is null ":"=")+getString("MAX_KENSU")+"");
		sql.append("	ORDER BY FLT_CD");
		sql.append("	");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_FLATC02_2(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	TRIM(NVL(FLT_CD       ,'')) AS FLT_CD        ,");
		sql.append("	TRIM(NVL(APL_BDT      ,'')) AS APL_BDT       ,");
		sql.append("	TRIM(NVL(AC_END_DT    ,'')) AS AC_END_DT     ,");
		sql.append("	TRIM(NVL(TMP_AC_TYP   ,'')) AS TMP_AC_TYP    ,");
		sql.append("	TRIM(NVL(CTRL_DVSN_CD ,'')) AS CTRL_DVSN_CD  ,");
		sql.append("	TRIM(NVL(CTRL_RGN_TYP ,'')) AS CTRL_RGN_TYP  ,");
		sql.append("	TRIM(NVL(TRPT_CLSS_TYP,'')) AS TRPT_CLSS_TYP ,");
		sql.append("	TRIM(NVL(TRPT_ENGL_NM ,'')) AS TRPT_ENGL_NM  ,");
		sql.append("	TRIM(NVL(TRPT_ENGL_AB ,'')) AS TRPT_ENGL_AB  ,");
		sql.append("	TRIM(NVL(TRPT_ENGL_ADR,'')) AS TRPT_ENGL_ADR ,");
		sql.append("	TRIM(NVL(TEL_NO       ,'')) AS TEL_NO        ,");
		sql.append("	TRIM(NVL(FAX_NO       ,'')) AS FAX_NO        ,");
		sql.append("	TRIM(NVL(RGS_PGM_NM   ,'')) AS RGS_PGM_NM    ,");
		sql.append("	TRIM(NVL(RGS_USR_ID   ,'')) AS RGS_USR_ID    ,");
		sql.append("	TO_CHAR(NVL(RGS_DTTM,''),'YYYYMMDDHH24MISS') AS RGS_DTTM,");
		sql.append("	TRIM(NVL(CHG_PGM_NM   ,'')) AS CHG_PGM_NM    ,");
		sql.append("	TRIM(NVL(CHG_USR_ID   ,'')) AS CHG_USR_ID    ,");
		sql.append("	TO_CHAR(NVL(CHG_DTTM,''),'YYYYMMDDHH24MISS') AS CHG_DTTM,");
		sql.append("	TRIM(NVL(CHG_TMS      ,'')) AS CHG_TMS    ");
		sql.append("	FROM FLATC");
		sql.append("	WHERE DEL_TYP <>1");
		sql.append("	AND APL_BDT > "+getString("SYS_DATE")+" ");
		sql.append("	AND FLT_CD LIKE "+getString("GCS_CD")+"");
		sql.append("	AND ROWNUM <"+((getString("MAX_KENSU").equals(""))?" is null ":"=")+getString("MAX_KENSU")+"");
		sql.append("	ORDER BY FLT_CD");
		sql.append("	");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_FLATC03_1(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	TRIM(NVL(FLT_CD       ,'')) AS FLT_CD        ,");
		sql.append("	TRIM(NVL(APL_BDT      ,'')) AS APL_BDT       ,");
		sql.append("	TRIM(NVL(AC_END_DT    ,'')) AS AC_END_DT     ,");
		sql.append("	TRIM(NVL(TMP_AC_TYP   ,'')) AS TMP_AC_TYP    ,");
		sql.append("	TRIM(NVL(CTRL_DVSN_CD ,'')) AS CTRL_DVSN_CD  ,");
		sql.append("	TRIM(NVL(CTRL_RGN_TYP ,'')) AS CTRL_RGN_TYP  ,");
		sql.append("	TRIM(NVL(TRPT_CLSS_TYP,'')) AS TRPT_CLSS_TYP ,");
		sql.append("	TRIM(NVL(TRPT_ENGL_NM ,'')) AS TRPT_ENGL_NM  ,");
		sql.append("	TRIM(NVL(TRPT_ENGL_AB ,'')) AS TRPT_ENGL_AB  ,");
		sql.append("	TRIM(NVL(TRPT_ENGL_ADR,'')) AS TRPT_ENGL_ADR ,");
		sql.append("	TRIM(NVL(TEL_NO       ,'')) AS TEL_NO        ,");
		sql.append("	TRIM(NVL(FAX_NO       ,'')) AS FAX_NO        ,");
		sql.append("	TRIM(NVL(RGS_PGM_NM   ,'')) AS RGS_PGM_NM    ,");
		sql.append("	TRIM(NVL(RGS_USR_ID   ,'')) AS RGS_USR_ID    ,");
		sql.append("	TO_CHAR(NVL(RGS_DTTM,''),'YYYYMMDDHH24MISS') AS RGS_DTTM,");
		sql.append("	TRIM(NVL(CHG_PGM_NM   ,'')) AS CHG_PGM_NM    ,");
		sql.append("	TRIM(NVL(CHG_USR_ID   ,'')) AS CHG_USR_ID    ,");
		sql.append("	TO_CHAR(NVL(CHG_DTTM,''),'YYYYMMDDHH24MISS') AS CHG_DTTM,");
		sql.append("	TRIM(NVL(CHG_TMS      ,'')) AS CHG_TMS         ");
		sql.append("	FROM FLATC");
		sql.append("	WHERE DEL_TYP <>1");
		sql.append("	AND ROWNUM <"+((getString("MAX_KENSU").equals(""))?" is null ":"=")+getString("MAX_KENSU")+"  ");
		sql.append("	ORDER BY FLT_CD");
		sql.append("	");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_FLATC03_2(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	TRIM(NVL(FLT_CD       ,'')) AS FLT_CD        ,");
		sql.append("	TRIM(NVL(APL_BDT      ,'')) AS APL_BDT       ,");
		sql.append("	TRIM(NVL(AC_END_DT    ,'')) AS AC_END_DT     ,");
		sql.append("	TRIM(NVL(TMP_AC_TYP   ,'')) AS TMP_AC_TYP    ,");
		sql.append("	TRIM(NVL(CTRL_DVSN_CD ,'')) AS CTRL_DVSN_CD  ,");
		sql.append("	TRIM(NVL(CTRL_RGN_TYP ,'')) AS CTRL_RGN_TYP  ,");
		sql.append("	TRIM(NVL(TRPT_CLSS_TYP,'')) AS TRPT_CLSS_TYP ,");
		sql.append("	TRIM(NVL(TRPT_ENGL_NM ,'')) AS TRPT_ENGL_NM  ,");
		sql.append("	TRIM(NVL(TRPT_ENGL_AB ,'')) AS TRPT_ENGL_AB  ,");
		sql.append("	TRIM(NVL(TRPT_ENGL_ADR,'')) AS TRPT_ENGL_ADR ,");
		sql.append("	TRIM(NVL(TEL_NO       ,'')) AS TEL_NO        ,");
		sql.append("	TRIM(NVL(FAX_NO       ,'')) AS FAX_NO        ,");
		sql.append("	TRIM(NVL(RGS_PGM_NM   ,'')) AS RGS_PGM_NM    ,");
		sql.append("	TRIM(NVL(RGS_USR_ID   ,'')) AS RGS_USR_ID    ,");
		sql.append("	TO_CHAR(NVL(RGS_DTTM,''),'YYYYMMDDHH24MISS') AS RGS_DTTM,");
		sql.append("	TRIM(NVL(CHG_PGM_NM   ,'')) AS CHG_PGM_NM    ,");
		sql.append("	TRIM(NVL(CHG_USR_ID   ,'')) AS CHG_USR_ID    ,");
		sql.append("	TO_CHAR(NVL(CHG_DTTM,''),'YYYYMMDDHH24MISS') AS CHG_DTTM,");
		sql.append("	TRIM(NVL(CHG_TMS      ,'')) AS CHG_TMS    ");
		sql.append("	FROM FLATC");
		sql.append("	WHERE DEL_TYP <>1");
		sql.append("	AND FLT_CD LIKE "+getString("GCS_CD")+"");
		sql.append("	AND ROWNUM <"+((getString("MAX_KENSU").equals(""))?" is null ":"=")+getString("MAX_KENSU")+"  ");
		sql.append("	ORDER BY FLT_CD");
		sql.append("	");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_FLATC04_1(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	TRIM(NVL(FLT_CD       ,'')) AS FLT_CD        ,");
		sql.append("	TRIM(NVL(APL_BDT      ,'')) AS APL_BDT       ,");
		sql.append("	TRIM(NVL(AC_END_DT    ,'')) AS AC_END_DT     ,");
		sql.append("	TRIM(NVL(TMP_AC_TYP   ,'')) AS TMP_AC_TYP    ,");
		sql.append("	TRIM(NVL(CTRL_DVSN_CD ,'')) AS CTRL_DVSN_CD  ,");
		sql.append("	TRIM(NVL(CTRL_RGN_TYP ,'')) AS CTRL_RGN_TYP  ,");
		sql.append("	TRIM(NVL(TRPT_CLSS_TYP,'')) AS TRPT_CLSS_TYP ,");
		sql.append("	TRIM(NVL(TRPT_ENGL_NM ,'')) AS TRPT_ENGL_NM  ,");
		sql.append("	TRIM(NVL(TRPT_ENGL_AB ,'')) AS TRPT_ENGL_AB  ,");
		sql.append("	TRIM(NVL(TRPT_ENGL_ADR,'')) AS TRPT_ENGL_ADR ,");
		sql.append("	TRIM(NVL(TEL_NO       ,'')) AS TEL_NO        ,");
		sql.append("	TRIM(NVL(FAX_NO       ,'')) AS FAX_NO        ,");
		sql.append("	TRIM(NVL(RGS_PGM_NM   ,'')) AS RGS_PGM_NM    ,");
		sql.append("	TRIM(NVL(RGS_USR_ID   ,'')) AS RGS_USR_ID    ,");
		sql.append("	TO_CHAR(NVL(RGS_DTTM,''),'YYYYMMDDHH24MISS') AS RGS_DTTM,");
		sql.append("	TRIM(NVL(CHG_PGM_NM   ,'')) AS CHG_PGM_NM    ,");
		sql.append("	TRIM(NVL(CHG_USR_ID   ,'')) AS CHG_USR_ID    ,");
		sql.append("	TO_CHAR(NVL(CHG_DTTM,''),'YYYYMMDDHH24MISS') AS CHG_DTTM,");
		sql.append("	TRIM(NVL(CHG_TMS      ,'')) AS CHG_TMS         ");
		sql.append("	FROM FLATC");
		sql.append("	WHERE DEL_TYP = 1");
		sql.append("	AND AC_END_DT < "+getString("SYS_DATE")+" ");
		sql.append("	AND ROWNUM <"+((getString("MAX_KENSU").equals(""))?" is null ":"=")+getString("MAX_KENSU")+"  ");
		sql.append("	ORDER BY FLT_CD");
		sql.append("	");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_FLATC04_2(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	TRIM(NVL(FLT_CD       ,'')) AS FLT_CD        ,");
		sql.append("	TRIM(NVL(APL_BDT      ,'')) AS APL_BDT       ,");
		sql.append("	TRIM(NVL(AC_END_DT    ,'')) AS AC_END_DT     ,");
		sql.append("	TRIM(NVL(TMP_AC_TYP   ,'')) AS TMP_AC_TYP    ,");
		sql.append("	TRIM(NVL(CTRL_DVSN_CD ,'')) AS CTRL_DVSN_CD  ,");
		sql.append("	TRIM(NVL(CTRL_RGN_TYP ,'')) AS CTRL_RGN_TYP  ,");
		sql.append("	TRIM(NVL(TRPT_CLSS_TYP,'')) AS TRPT_CLSS_TYP ,");
		sql.append("	TRIM(NVL(TRPT_ENGL_NM ,'')) AS TRPT_ENGL_NM  ,");
		sql.append("	TRIM(NVL(TRPT_ENGL_AB ,'')) AS TRPT_ENGL_AB  ,");
		sql.append("	TRIM(NVL(TRPT_ENGL_ADR,'')) AS TRPT_ENGL_ADR ,");
		sql.append("	TRIM(NVL(TEL_NO       ,'')) AS TEL_NO        ,");
		sql.append("	TRIM(NVL(FAX_NO       ,'')) AS FAX_NO        ,");
		sql.append("	TRIM(NVL(RGS_PGM_NM   ,'')) AS RGS_PGM_NM    ,");
		sql.append("	TRIM(NVL(RGS_USR_ID   ,'')) AS RGS_USR_ID    ,");
		sql.append("	TO_CHAR(NVL(RGS_DTTM,''),'YYYYMMDDHH24MISS') AS RGS_DTTM,");
		sql.append("	TRIM(NVL(CHG_PGM_NM   ,'')) AS CHG_PGM_NM    ,");
		sql.append("	TRIM(NVL(CHG_USR_ID   ,'')) AS CHG_USR_ID    ,");
		sql.append("	TO_CHAR(NVL(CHG_DTTM,''),'YYYYMMDDHH24MISS') AS CHG_DTTM,");
		sql.append("	TRIM(NVL(CHG_TMS      ,'')) AS CHG_TMS    ");
		sql.append("	FROM FLATC");
		sql.append("	WHERE DEL_TYP = 1");
		sql.append("	AND AC_END_DT < "+getString("SYS_DATE")+" ");
		sql.append("	AND FLT_CD LIKE "+getString("GCS_CD")+"");
		sql.append("	AND ROWNUM <"+((getString("MAX_KENSU").equals(""))?" is null ":"=")+getString("MAX_KENSU")+"  ");
		sql.append("	ORDER BY FLT_CD");
		sql.append("	");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_PMDLNO01_1(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	TRIM(NVL(A.MDLNO       ,'')) AS MDLNO       ,");
		sql.append("	TRIM(NVL(A.SUP_CD      ,'')) AS SUP_CD      ,");
		sql.append("	TRIM(NVL(A.MFC_CD      ,'')) AS MFC_CD      ,");
		sql.append("	TRIM(NVL(A.SLS_DEPT_CD ,'')) AS SLS_DEPT_CD ,");
		sql.append("	TRIM(NVL(A.CLR_CD      ,'')) AS CLR_CD      ,");
		sql.append("	TRIM(NVL(A.O_MDLNO     ,'')) AS O_MDLNO     ,");
		sql.append("	TRIM(NVL(A.HS_CD       ,'')) AS HS_CD       ,");
		sql.append("	TRIM(NVL(A.ACC_CAT     ,'')) AS ACC_CAT     ,");
		sql.append("	TRIM(NVL(A.OVS_CAT     ,'')) AS OVS_CAT     ,");
		sql.append("	TRIM(NVL(B.PACK_STYL_CD,'')) AS PACK_STYL_CD,");
		sql.append("	TRIM(NVL(B.PER_PACK    ,'')) AS PER_PACK    ,");
		sql.append("	TRIM(NVL(B.Q_DEC_PNT   ,'')) AS Q_DEC_PNT   ,");
		sql.append("	TRIM(NVL(B.NET_WT      ,'')) AS NET_WT      ,");
		sql.append("	TRIM(NVL(B.GRS_WT      ,'')) AS GRS_WT      ,");
		sql.append("	TRIM(NVL(B.MN          ,'')) AS MN          ,");
		sql.append("	TRIM(NVL(B.END_USR_CD  ,'')) AS END_USR_CD  ,");
		sql.append("	TRIM(NVL(B.TERM_CD     ,'')) AS TERM_CD     ,");
		sql.append("	TRIM(NVL(B.TERM_ID     ,'')) AS TERM_ID     ,");
		sql.append("	TRIM(NVL(B.CRCY_CD     ,'')) AS CRCY_CD     ,");
		sql.append("	TRIM(NVL(B.PAYE_CD     ,'')) AS PAYE_CD   ");
		sql.append("	FROM PMDLNO A, PPRC B  ");
		sql.append("	WHERE A.MDLNO = B.MDLNO(+)");
		sql.append("	AND A.SUP_CD = B.SUP_CD(+)");
		sql.append("	AND A.DEL_TYP <> 1");
		sql.append("	AND B.DEL_TYP <> 1");
		sql.append("	AND ROWNUM <"+((getString("MAX_KENSU").equals(""))?" is null ":"=")+getString("MAX_KENSU")+"  ");
		sql.append("	ORDER BY MDLNO,SUP_CD");
		sql.append("	");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_PMDLNO01_2(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	TRIM(NVL(A.MDLNO       ,'')) AS MDLNO       ,");
		sql.append("	TRIM(NVL(A.SUP_CD      ,'')) AS SUP_CD      ,");
		sql.append("	TRIM(NVL(A.MFC_CD      ,'')) AS MFC_CD      ,");
		sql.append("	TRIM(NVL(A.SLS_DEPT_CD ,'')) AS SLS_DEPT_CD ,");
		sql.append("	TRIM(NVL(A.CLR_CD      ,'')) AS CLR_CD      ,");
		sql.append("	TRIM(NVL(A.O_MDLNO     ,'')) AS O_MDLNO     ,");
		sql.append("	TRIM(NVL(A.HS_CD       ,'')) AS HS_CD       ,");
		sql.append("	TRIM(NVL(A.ACC_CAT     ,'')) AS ACC_CAT     ,");
		sql.append("	TRIM(NVL(A.OVS_CAT     ,'')) AS OVS_CAT     ,");
		sql.append("	TRIM(NVL(B.PACK_STYL_CD,'')) AS PACK_STYL_CD,");
		sql.append("	TRIM(NVL(B.PER_PACK    ,'')) AS PER_PACK    ,");
		sql.append("	TRIM(NVL(B.Q_DEC_PNT   ,'')) AS Q_DEC_PNT   ,");
		sql.append("	TRIM(NVL(B.NET_WT      ,'')) AS NET_WT      ,");
		sql.append("	TRIM(NVL(B.GRS_WT      ,'')) AS GRS_WT      ,");
		sql.append("	TRIM(NVL(B.MN          ,'')) AS MN          ,");
		sql.append("	TRIM(NVL(B.END_USR_CD  ,'')) AS END_USR_CD  ,");
		sql.append("	TRIM(NVL(B.TERM_CD     ,'')) AS TERM_CD     ,");
		sql.append("	TRIM(NVL(B.TERM_ID     ,'')) AS TERM_ID     ,");
		sql.append("	TRIM(NVL(B.CRCY_CD     ,'')) AS CRCY_CD     ,");
		sql.append("	TRIM(NVL(B.PAYE_CD     ,'')) AS PAYE_CD   ");
		sql.append("	FROM PMDLNO A, PPRC B  ");
		sql.append("	WHERE A.MDLNO = B.MDLNO(+)");
		sql.append("	AND A.SUP_CD = B.SUP_CD(+)");
		sql.append("	AND A.DEL_TYP <> 1");
		sql.append("	AND B.DEL_TYP <> 1");
		sql.append("	AND A.MDLNO LIKE "+getString("GCS_CD")+"");
		sql.append("	AND ROWNUM <"+((getString("MAX_KENSU").equals(""))?" is null ":"=")+getString("MAX_KENSU")+"  ");
		sql.append("	ORDER BY MDLNO,SUP_CD");
		sql.append("	");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_PMDLNO02_1(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	TRIM(NVL(A.MDLNO       ,'')) AS MDLNO       ,");
		sql.append("	TRIM(NVL(A.SUP_CD      ,'')) AS SUP_CD      ,");
		sql.append("	TRIM(NVL(A.MFC_CD      ,'')) AS MFC_CD      ,");
		sql.append("	TRIM(NVL(A.SLS_DEPT_CD ,'')) AS SLS_DEPT_CD ,");
		sql.append("	TRIM(NVL(A.CLR_CD      ,'')) AS CLR_CD      ,");
		sql.append("	TRIM(NVL(A.O_MDLNO     ,'')) AS O_MDLNO     ,");
		sql.append("	TRIM(NVL(A.HS_CD       ,'')) AS HS_CD       ,");
		sql.append("	TRIM(NVL(A.ACC_CAT     ,'')) AS ACC_CAT     ,");
		sql.append("	TRIM(NVL(A.OVS_CAT     ,'')) AS OVS_CAT     ,");
		sql.append("	TRIM(NVL(B.PACK_STYL_CD,'')) AS PACK_STYL_CD,");
		sql.append("	TRIM(NVL(B.PER_PACK    ,'')) AS PER_PACK    ,");
		sql.append("	TRIM(NVL(B.Q_DEC_PNT   ,'')) AS Q_DEC_PNT   ,");
		sql.append("	TRIM(NVL(B.NET_WT      ,'')) AS NET_WT      ,");
		sql.append("	TRIM(NVL(B.GRS_WT      ,'')) AS GRS_WT      ,");
		sql.append("	TRIM(NVL(B.MN          ,'')) AS MN          ,");
		sql.append("	TRIM(NVL(B.END_USR_CD  ,'')) AS END_USR_CD  ,");
		sql.append("	TRIM(NVL(B.TERM_CD     ,'')) AS TERM_CD     ,");
		sql.append("	TRIM(NVL(B.TERM_ID     ,'')) AS TERM_ID     ,");
		sql.append("	TRIM(NVL(B.CRCY_CD     ,'')) AS CRCY_CD     ,");
		sql.append("	TRIM(NVL(B.PAYE_CD     ,'')) AS PAYE_CD   ");
		sql.append("	FROM PMDLNO A, PPRC B  ");
		sql.append("	WHERE A.MDLNO = B.MDLNO(+)");
		sql.append("	AND A.SUP_CD =B.SUP_CD(+)");
		sql.append("	AND A.DEL_TYP = 1");
		sql.append("	AND B.DEL_TYP = 1");
		sql.append("	AND ROWNUM <"+((getString("MAX_KENSU").equals(""))?" is null ":"=")+getString("MAX_KENSU")+"  ");
		sql.append("	ORDER BY MDLNO,SUP_CD");
		sql.append("	");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_PMDLNO02_2(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	TRIM(NVL(A.MDLNO       ,'')) AS MDLNO       ,");
		sql.append("	TRIM(NVL(A.SUP_CD      ,'')) AS SUP_CD      ,");
		sql.append("	TRIM(NVL(A.MFC_CD      ,'')) AS MFC_CD      ,");
		sql.append("	TRIM(NVL(A.SLS_DEPT_CD ,'')) AS SLS_DEPT_CD ,");
		sql.append("	TRIM(NVL(A.CLR_CD      ,'')) AS CLR_CD      ,");
		sql.append("	TRIM(NVL(A.O_MDLNO     ,'')) AS O_MDLNO     ,");
		sql.append("	TRIM(NVL(A.HS_CD       ,'')) AS HS_CD       ,");
		sql.append("	TRIM(NVL(A.ACC_CAT     ,'')) AS ACC_CAT     ,");
		sql.append("	TRIM(NVL(A.OVS_CAT     ,'')) AS OVS_CAT     ,");
		sql.append("	TRIM(NVL(B.PACK_STYL_CD,'')) AS PACK_STYL_CD,");
		sql.append("	TRIM(NVL(B.PER_PACK    ,'')) AS PER_PACK    ,");
		sql.append("	TRIM(NVL(B.Q_DEC_PNT   ,'')) AS Q_DEC_PNT   ,");
		sql.append("	TRIM(NVL(B.NET_WT      ,'')) AS NET_WT      ,");
		sql.append("	TRIM(NVL(B.GRS_WT      ,'')) AS GRS_WT      ,");
		sql.append("	TRIM(NVL(B.MN          ,'')) AS MN          ,");
		sql.append("	TRIM(NVL(B.END_USR_CD  ,'')) AS END_USR_CD  ,");
		sql.append("	TRIM(NVL(B.TERM_CD     ,'')) AS TERM_CD     ,");
		sql.append("	TRIM(NVL(B.TERM_ID     ,'')) AS TERM_ID     ,");
		sql.append("	TRIM(NVL(B.CRCY_CD     ,'')) AS CRCY_CD     ,");
		sql.append("	TRIM(NVL(B.PAYE_CD     ,'')) AS PAYE_CD   ");
		sql.append("	FROM PMDLNO A, PPRC B  ");
		sql.append("	WHERE A.MDLNO = B.MDLNO(+)");
		sql.append("	AND A.SUP_CD =B.SUP_CD(+)");
		sql.append("	AND A.DEL_TYP = 1");
		sql.append("	AND B.DEL_TYP = 1");
		sql.append("	AND A.MDLNO LIKE "+getString("GCS_CD")+"");
		sql.append("	AND ROWNUM <"+((getString("MAX_KENSU").equals(""))?" is null ":"=")+getString("MAX_KENSU")+"  ");
		sql.append("	ORDER BY MDLNO,SUP_CD");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_SCMMD01_1(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	TRIM(NVL(SLCP_CD     ,'')) AS SLCP_CD     ,");
		sql.append("	TRIM(NVL(PTNR_CD     ,'')) AS PTNR_CD     ,");
		sql.append("	TRIM(NVL(ITM_NO      ,'')) AS ITM_NO      ,");
		sql.append("	TRIM(NVL(TRSP_STYL_CD,'')) AS TRSP_STYL_CD,");
		sql.append("	TRIM(NVL(GNR_ADM_NO,'')) AS GNR_ADM_NO,");
		sql.append("	TRIM(NVL(P_E_A_BGN_DT,'')) AS P_E_A_BGN_DT,");
		sql.append("	TRIM(NVL(P_E_A_END_DT,'')) AS P_E_A_END_DT,");
		sql.append("	TRIM(NVL(LOCK_LT     ,'')) AS LOCK_LT     ,");
		sql.append("	TRIM(NVL(INDC_ODR_LT ,'')) AS INDC_ODR_LT ,");
		sql.append("	TRIM(NVL(INDC_ODR_LT2,'')) AS INDC_ODR_LT2,");
		sql.append("	TRIM(NVL(RPL_DVSN_CD ,'')) AS RPL_DVSN_CD ,");
		sql.append("	TRIM(NVL(ODR_DVSN_CD ,'')) AS ODR_DVSN_CD ,");
		sql.append("	TRIM(NVL(RGS_PGM_NM  ,'')) AS RGS_PGM_NM  ,");
		sql.append("	TRIM(NVL(RGS_USR_ID  ,'')) AS RGS_USR_ID  ,");
		sql.append("	TRIM(NVL(RGS_DTTM    ,'')) AS RGS_DTTM    ,");
		sql.append("	TRIM(NVL(CHG_PGM_NM  ,'')) AS CHG_PGM_NM  ,");
		sql.append("	TRIM(NVL(CHG_USR_ID  ,'')) AS CHG_USR_ID  ,");
		sql.append("	TRIM(NVL(CHG_DTTM    ,'')) AS CHG_DTTM    ,");
		sql.append("	TRIM(NVL(CHG_TMS     ,'')) AS CHG_TMS    ");
		sql.append("	FROM SCMMD ");
		sql.append("	WHERE DEL_TYP <> 1");
		sql.append("	AND ROWNUM <"+((getString("MAX_KENSU").equals(""))?" is null ":"=")+getString("MAX_KENSU")+"  ");
		sql.append("	ORDER BY SLCP_CD,PTNR_CD,ITM_NO,TRSP_STYL_CD");
		sql.append("	");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_SCMMD01_2(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	TRIM(NVL(SLCP_CD     ,'')) AS SLCP_CD     ,");
		sql.append("	TRIM(NVL(PTNR_CD     ,'')) AS PTNR_CD     ,");
		sql.append("	TRIM(NVL(ITM_NO      ,'')) AS ITM_NO      ,");
		sql.append("	TRIM(NVL(TRSP_STYL_CD,'')) AS TRSP_STYL_CD,");
		sql.append("	TRIM(NVL(GNR_ADM_NO,'')) AS GNR_ADM_NO,");
		sql.append("	TRIM(NVL(P_E_A_BGN_DT,'')) AS P_E_A_BGN_DT,");
		sql.append("	TRIM(NVL(P_E_A_END_DT,'')) AS P_E_A_END_DT,");
		sql.append("	TRIM(NVL(LOCK_LT     ,'')) AS LOCK_LT     ,");
		sql.append("	TRIM(NVL(INDC_ODR_LT ,'')) AS INDC_ODR_LT ,");
		sql.append("	TRIM(NVL(INDC_ODR_LT2,'')) AS INDC_ODR_LT2,");
		sql.append("	TRIM(NVL(RPL_DVSN_CD ,'')) AS RPL_DVSN_CD ,");
		sql.append("	TRIM(NVL(ODR_DVSN_CD ,'')) AS ODR_DVSN_CD ,");
		sql.append("	TRIM(NVL(RGS_PGM_NM  ,'')) AS RGS_PGM_NM  ,");
		sql.append("	TRIM(NVL(RGS_USR_ID  ,'')) AS RGS_USR_ID  ,");
		sql.append("	TRIM(NVL(RGS_DTTM    ,'')) AS RGS_DTTM    ,");
		sql.append("	TRIM(NVL(CHG_PGM_NM  ,'')) AS CHG_PGM_NM  ,");
		sql.append("	TRIM(NVL(CHG_USR_ID  ,'')) AS CHG_USR_ID  ,");
		sql.append("	TRIM(NVL(CHG_DTTM    ,'')) AS CHG_DTTM    ,");
		sql.append("	TRIM(NVL(CHG_TMS     ,'')) AS CHG_TMS    ");
		sql.append("	FROM SCMMD ");
		sql.append("	WHERE DEL_TYP <> 1");
		sql.append("	AND ITM_NO LIKE "+getString("GCS_CD")+"");
		sql.append("	AND ROWNUM <"+((getString("MAX_KENSU").equals(""))?" is null ":"=")+getString("MAX_KENSU")+"  ");
		sql.append("	ORDER BY SLCP_CD,PTNR_CD,ITM_NO,TRSP_STYL_CD");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_SCMMD02_1(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	TRIM(NVL(SLCP_CD     ,'')) AS SLCP_CD     ,");
		sql.append("	TRIM(NVL(PTNR_CD     ,'')) AS PTNR_CD     ,");
		sql.append("	TRIM(NVL(ITM_NO      ,'')) AS ITM_NO      ,");
		sql.append("	TRIM(NVL(TRSP_STYL_CD,'')) AS TRSP_STYL_CD,");
		sql.append("	TRIM(NVL(GNR_ADM_NO,'')) AS GNR_ADM_NO,");
		sql.append("	TRIM(NVL(P_E_A_BGN_DT,'')) AS P_E_A_BGN_DT,");
		sql.append("	TRIM(NVL(P_E_A_END_DT,'')) AS P_E_A_END_DT,");
		sql.append("	TRIM(NVL(LOCK_LT     ,'')) AS LOCK_LT     ,");
		sql.append("	TRIM(NVL(INDC_ODR_LT ,'')) AS INDC_ODR_LT ,");
		sql.append("	TRIM(NVL(INDC_ODR_LT2,'')) AS INDC_ODR_LT2,");
		sql.append("	TRIM(NVL(RPL_DVSN_CD ,'')) AS RPL_DVSN_CD ,");
		sql.append("	TRIM(NVL(ODR_DVSN_CD ,'')) AS ODR_DVSN_CD ,");
		sql.append("	TRIM(NVL(RGS_PGM_NM  ,'')) AS RGS_PGM_NM  ,");
		sql.append("	TRIM(NVL(RGS_USR_ID  ,'')) AS RGS_USR_ID  ,");
		sql.append("	TRIM(NVL(RGS_DTTM    ,'')) AS RGS_DTTM    ,");
		sql.append("	TRIM(NVL(CHG_PGM_NM  ,'')) AS CHG_PGM_NM  ,");
		sql.append("	TRIM(NVL(CHG_USR_ID  ,'')) AS CHG_USR_ID  ,");
		sql.append("	TRIM(NVL(CHG_DTTM    ,'')) AS CHG_DTTM    ,");
		sql.append("	TRIM(NVL(CHG_TMS     ,'')) AS CHG_TMS    ");
		sql.append("	FROM SCMMD ");
		sql.append("	WHERE DEL_TYP = 1");
		sql.append("	AND ROWNUM <"+((getString("MAX_KENSU").equals(""))?" is null ":"=")+getString("MAX_KENSU")+"  ");
		sql.append("	ORDER BY SLCP_CD,PTNR_CD,ITM_NO,TRSP_STYL_CD");
		sql.append("	");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_SCMMD02_2(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	TRIM(NVL(SLCP_CD     ,'')) AS SLCP_CD     ,");
		sql.append("	TRIM(NVL(PTNR_CD     ,'')) AS PTNR_CD     ,");
		sql.append("	TRIM(NVL(ITM_NO      ,'')) AS ITM_NO      ,");
		sql.append("	TRIM(NVL(TRSP_STYL_CD,'')) AS TRSP_STYL_CD,");
		sql.append("	TRIM(NVL(GNR_ADM_NO,'')) AS GNR_ADM_NO,");
		sql.append("	TRIM(NVL(P_E_A_BGN_DT,'')) AS P_E_A_BGN_DT,");
		sql.append("	TRIM(NVL(P_E_A_END_DT,'')) AS P_E_A_END_DT,");
		sql.append("	TRIM(NVL(LOCK_LT     ,'')) AS LOCK_LT     ,");
		sql.append("	TRIM(NVL(INDC_ODR_LT ,'')) AS INDC_ODR_LT ,");
		sql.append("	TRIM(NVL(INDC_ODR_LT2,'')) AS INDC_ODR_LT2,");
		sql.append("	TRIM(NVL(RPL_DVSN_CD ,'')) AS RPL_DVSN_CD ,");
		sql.append("	TRIM(NVL(ODR_DVSN_CD ,'')) AS ODR_DVSN_CD ,");
		sql.append("	TRIM(NVL(RGS_PGM_NM  ,'')) AS RGS_PGM_NM  ,");
		sql.append("	TRIM(NVL(RGS_USR_ID  ,'')) AS RGS_USR_ID  ,");
		sql.append("	TRIM(NVL(RGS_DTTM    ,'')) AS RGS_DTTM    ,");
		sql.append("	TRIM(NVL(CHG_PGM_NM  ,'')) AS CHG_PGM_NM  ,");
		sql.append("	TRIM(NVL(CHG_USR_ID  ,'')) AS CHG_USR_ID  ,");
		sql.append("	TRIM(NVL(CHG_DTTM    ,'')) AS CHG_DTTM    ,");
		sql.append("	TRIM(NVL(CHG_TMS     ,'')) AS CHG_TMS    ");
		sql.append("	FROM SCMMD ");
		sql.append("	WHERE DEL_TYP = 1");
		sql.append("	AND ITM_NO LIKE "+getString("GCS_CD")+"");
		sql.append("	AND ROWNUM <"+((getString("MAX_KENSU").equals(""))?" is null ":"=")+getString("MAX_KENSU")+"  ");
		sql.append("	ORDER BY SLCP_CD,PTNR_CD,ITM_NO,TRSP_STYL_CD");
		sql.append("	");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_DCAT01_1(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	TRIM(NVL(DCAT_CD      ,'')) AS DCAT_CD      ,");
		sql.append("	TRIM(NVL(APL_BDT      ,'')) AS APL_BDT      ,");
		sql.append("	TRIM(NVL(APL_EDT      ,'')) AS APL_EDT      ,");
		sql.append("	TRIM(NVL(APL_DVSN_CD  ,'')) AS APL_DVSN_CD  ,");
		sql.append("	TRIM(NVL(GCAT_CD      ,'')) AS GCAT_CD      ,");
		sql.append("	TRIM(NVL(D_CD_ENGL_NM ,'')) AS D_CD_ENGL_NM ,");
		sql.append("	TRIM(NVL(D_CD_ENGL_DSC,'')) AS D_CD_ENGL_DSC,");
		sql.append("	TRIM(NVL(DEL_TYP      ,'')) AS DEL_TYP      ,");
		sql.append("	TRIM(NVL(FM_TYP       ,'')) AS FM_TYP       ,");
		sql.append("	TRIM(NVL(RGS_PGM_NM   ,'')) AS RGS_PGM_NM   ,");
		sql.append("	TRIM(NVL(RGS_USR_ID   ,'')) AS RGS_USR_ID   ,");
		sql.append("	TO_CHAR(NVL(RGS_DTTM,''),'YYYYMMDDHH24MISS') AS RGS_DTTM,");
		sql.append("	TRIM(NVL(CHG_PGM_NM   ,'')) AS CHG_PGM_NM   ,");
		sql.append("	TRIM(NVL(CHG_USR_ID   ,'')) AS CHG_USR_ID   ,");
		sql.append("	TO_CHAR(NVL(CHG_DTTM,''),'YYYYMMDDHH24MISS') AS CHG_DTTM,");
		sql.append("	TRIM(NVL(CHG_TMS      ,'')) AS CHG_TMS      ,");
		sql.append("	TRIM(NVL(CHG_DTTM    ,'')) AS CHG_DTTM    ,");
		sql.append("	TRIM(NVL(CHG_TMS     ,'')) AS CHG_TMS ");
		sql.append("	FROM DCAT");
		sql.append("	WHERE DEL_TYP <>1");
		sql.append("	AND FM_TYP <> 6");
		sql.append("	AND APL_BDT <"+((getString("SYS_DATE").equals(""))?" is null ":"=")+getString("SYS_DATE")+" ");
		sql.append("	AND APL_EDT >"+((getString("SYS_DATE").equals(""))?" is null ":"=")+getString("SYS_DATE")+" ");
		sql.append("	AND ROWNUM <"+((getString("MAX_KENSU").equals(""))?" is null ":"=")+getString("MAX_KENSU")+"  ");
		sql.append("	ORDER BY DCAT_CD");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_DCAT01_2(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	TRIM(NVL(DCAT_CD      ,'')) AS DCAT_CD      ,");
		sql.append("	TRIM(NVL(APL_BDT      ,'')) AS APL_BDT      ,");
		sql.append("	TRIM(NVL(APL_EDT      ,'')) AS APL_EDT      ,");
		sql.append("	TRIM(NVL(APL_DVSN_CD  ,'')) AS APL_DVSN_CD  ,");
		sql.append("	TRIM(NVL(GCAT_CD      ,'')) AS GCAT_CD      ,");
		sql.append("	TRIM(NVL(D_CD_ENGL_NM ,'')) AS D_CD_ENGL_NM ,");
		sql.append("	TRIM(NVL(D_CD_ENGL_DSC,'')) AS D_CD_ENGL_DSC,");
		sql.append("	TRIM(NVL(DEL_TYP      ,'')) AS DEL_TYP      ,");
		sql.append("	TRIM(NVL(FM_TYP       ,'')) AS FM_TYP       ,");
		sql.append("	TRIM(NVL(RGS_PGM_NM   ,'')) AS RGS_PGM_NM   ,");
		sql.append("	TRIM(NVL(RGS_USR_ID   ,'')) AS RGS_USR_ID   ,");
		sql.append("	TO_CHAR(NVL(RGS_DTTM,''),'YYYYMMDDHH24MISS') AS RGS_DTTM,");
		sql.append("	TRIM(NVL(CHG_PGM_NM   ,'')) AS CHG_PGM_NM   ,");
		sql.append("	TRIM(NVL(CHG_USR_ID   ,'')) AS CHG_USR_ID   ,");
		sql.append("	TO_CHAR(NVL(CHG_DTTM,''),'YYYYMMDDHH24MISS') AS CHG_DTTM,");
		sql.append("	TRIM(NVL(CHG_TMS      ,'')) AS CHG_TMS      ,");
		sql.append("	TRIM(NVL(CHG_DTTM    ,'')) AS CHG_DTTM    ,");
		sql.append("	TRIM(NVL(CHG_TMS     ,'')) AS CHG_TMS ");
		sql.append("	FROM DCAT");
		sql.append("	WHERE DEL_TYP <>1");
		sql.append("	AND FM_TYP <> 6");
		sql.append("	AND APL_BDT <"+((getString("SYS_DATE").equals(""))?" is null ":"=")+getString("SYS_DATE")+" ");
		sql.append("	AND APL_EDT >"+((getString("SYS_DATE").equals(""))?" is null ":"=")+getString("SYS_DATE")+" ");
		sql.append("	AND DCAT_CD LIKE "+getString("GCS_CD")+"");
		sql.append("	AND ROWNUM <"+((getString("MAX_KENSU").equals(""))?" is null ":"=")+getString("MAX_KENSU")+"  ");
		sql.append("	ORDER BY DCAT_CD");
		sql.append("	");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_DCAT02_1(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	TRIM(NVL(DCAT_CD      ,'')) AS DCAT_CD      ,");
		sql.append("	TRIM(NVL(APL_BDT      ,'')) AS APL_BDT      ,");
		sql.append("	TRIM(NVL(APL_EDT      ,'')) AS APL_EDT      ,");
		sql.append("	TRIM(NVL(APL_DVSN_CD  ,'')) AS APL_DVSN_CD  ,");
		sql.append("	TRIM(NVL(GCAT_CD      ,'')) AS GCAT_CD      ,");
		sql.append("	TRIM(NVL(D_CD_ENGL_NM ,'')) AS D_CD_ENGL_NM ,");
		sql.append("	TRIM(NVL(D_CD_ENGL_DSC,'')) AS D_CD_ENGL_DSC,");
		sql.append("	TRIM(NVL(DEL_TYP      ,'')) AS DEL_TYP      ,");
		sql.append("	TRIM(NVL(FM_TYP       ,'')) AS FM_TYP       ,");
		sql.append("	TRIM(NVL(RGS_PGM_NM   ,'')) AS RGS_PGM_NM   ,");
		sql.append("	TRIM(NVL(RGS_USR_ID   ,'')) AS RGS_USR_ID   ,");
		sql.append("	TO_CHAR(NVL(RGS_DTTM,''),'YYYYMMDDHH24MISS') AS RGS_DTTM,");
		sql.append("	TRIM(NVL(CHG_PGM_NM   ,'')) AS CHG_PGM_NM   ,");
		sql.append("	TRIM(NVL(CHG_USR_ID   ,'')) AS CHG_USR_ID   ,");
		sql.append("	TO_CHAR(NVL(CHG_DTTM,''),'YYYYMMDDHH24MISS') AS CHG_DTTM,");
		sql.append("	TRIM(NVL(CHG_TMS      ,'')) AS CHG_TMS      ,");
		sql.append("	TRIM(NVL(CHG_DTTM    ,'')) AS CHG_DTTM    ,");
		sql.append("	TRIM(NVL(CHG_TMS     ,'')) AS CHG_TMS ");
		sql.append("	FROM DCAT");
		sql.append("	WHERE DEL_TYP <>1");
		sql.append("	AND FM_TYP <> 6");
		sql.append("	AND APL_BDT > "+getString("SYS_DATE")+" ");
		sql.append("	AND ROWNUM <"+((getString("MAX_KENSU").equals(""))?" is null ":"=")+getString("MAX_KENSU")+"  ");
		sql.append("	ORDER BY DCAT_CD");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_DCAT02_2(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	TRIM(NVL(DCAT_CD      ,'')) AS DCAT_CD      ,");
		sql.append("	TRIM(NVL(APL_BDT      ,'')) AS APL_BDT      ,");
		sql.append("	TRIM(NVL(APL_EDT      ,'')) AS APL_EDT      ,");
		sql.append("	TRIM(NVL(APL_DVSN_CD  ,'')) AS APL_DVSN_CD  ,");
		sql.append("	TRIM(NVL(GCAT_CD      ,'')) AS GCAT_CD      ,");
		sql.append("	TRIM(NVL(D_CD_ENGL_NM ,'')) AS D_CD_ENGL_NM ,");
		sql.append("	TRIM(NVL(D_CD_ENGL_DSC,'')) AS D_CD_ENGL_DSC,");
		sql.append("	TRIM(NVL(DEL_TYP      ,'')) AS DEL_TYP      ,");
		sql.append("	TRIM(NVL(FM_TYP       ,'')) AS FM_TYP       ,");
		sql.append("	TRIM(NVL(RGS_PGM_NM   ,'')) AS RGS_PGM_NM   ,");
		sql.append("	TRIM(NVL(RGS_USR_ID   ,'')) AS RGS_USR_ID   ,");
		sql.append("	TO_CHAR(NVL(RGS_DTTM,''),'YYYYMMDDHH24MISS') AS RGS_DTTM,");
		sql.append("	TRIM(NVL(CHG_PGM_NM   ,'')) AS CHG_PGM_NM   ,");
		sql.append("	TRIM(NVL(CHG_USR_ID   ,'')) AS CHG_USR_ID   ,");
		sql.append("	TO_CHAR(NVL(CHG_DTTM,''),'YYYYMMDDHH24MISS') AS CHG_DTTM,");
		sql.append("	TRIM(NVL(CHG_TMS      ,'')) AS CHG_TMS      ,");
		sql.append("	TRIM(NVL(CHG_DTTM    ,'')) AS CHG_DTTM    ,");
		sql.append("	TRIM(NVL(CHG_TMS     ,'')) AS CHG_TMS ");
		sql.append("	FROM DCAT");
		sql.append("	WHERE DEL_TYP <>1");
		sql.append("	AND FM_TYP <> 6");
		sql.append("	AND APL_BDT > "+getString("SYS_DATE")+" ");
		sql.append("	AND DCAT_CD LIKE "+getString("GCS_CD")+"");
		sql.append("	AND ROWNUM <"+((getString("MAX_KENSU").equals(""))?" is null ":"=")+getString("MAX_KENSU")+"  ");
		sql.append("	ORDER BY DCAT_CD");
		sql.append("	");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_DCAT03_1(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	TRIM(NVL(DCAT_CD      ,'')) AS DCAT_CD      ,");
		sql.append("	TRIM(NVL(APL_BDT      ,'')) AS APL_BDT      ,");
		sql.append("	TRIM(NVL(APL_EDT      ,'')) AS APL_EDT      ,");
		sql.append("	TRIM(NVL(APL_DVSN_CD  ,'')) AS APL_DVSN_CD  ,");
		sql.append("	TRIM(NVL(GCAT_CD      ,'')) AS GCAT_CD      ,");
		sql.append("	TRIM(NVL(D_CD_ENGL_NM ,'')) AS D_CD_ENGL_NM ,");
		sql.append("	TRIM(NVL(D_CD_ENGL_DSC,'')) AS D_CD_ENGL_DSC,");
		sql.append("	TRIM(NVL(DEL_TYP      ,'')) AS DEL_TYP      ,");
		sql.append("	TRIM(NVL(FM_TYP       ,'')) AS FM_TYP       ,");
		sql.append("	TRIM(NVL(RGS_PGM_NM   ,'')) AS RGS_PGM_NM   ,");
		sql.append("	TRIM(NVL(RGS_USR_ID   ,'')) AS RGS_USR_ID   ,");
		sql.append("	TO_CHAR(NVL(RGS_DTTM,''),'YYYYMMDDHH24MISS') AS RGS_DTTM,");
		sql.append("	TRIM(NVL(CHG_PGM_NM   ,'')) AS CHG_PGM_NM   ,");
		sql.append("	TRIM(NVL(CHG_USR_ID   ,'')) AS CHG_USR_ID   ,");
		sql.append("	TO_CHAR(NVL(CHG_DTTM,''),'YYYYMMDDHH24MISS') AS CHG_DTTM,");
		sql.append("	TRIM(NVL(CHG_TMS      ,'')) AS CHG_TMS      ,");
		sql.append("	TRIM(NVL(CHG_DTTM    ,'')) AS CHG_DTTM    ,");
		sql.append("	TRIM(NVL(CHG_TMS     ,'')) AS CHG_TMS ");
		sql.append("	FROM DCAT");
		sql.append("	WHERE DEL_TYP <>1");
		sql.append("	AND FM_TYP <> 6");
		sql.append("	AND ROWNUM <"+((getString("MAX_KENSU").equals(""))?" is null ":"=")+getString("MAX_KENSU")+"  ");
		sql.append("	ORDER BY DCAT_CD");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_DCAT03_2(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	TRIM(NVL(DCAT_CD      ,'')) AS DCAT_CD      ,");
		sql.append("	TRIM(NVL(APL_BDT      ,'')) AS APL_BDT      ,");
		sql.append("	TRIM(NVL(APL_EDT      ,'')) AS APL_EDT      ,");
		sql.append("	TRIM(NVL(APL_DVSN_CD  ,'')) AS APL_DVSN_CD  ,");
		sql.append("	TRIM(NVL(GCAT_CD      ,'')) AS GCAT_CD      ,");
		sql.append("	TRIM(NVL(D_CD_ENGL_NM ,'')) AS D_CD_ENGL_NM ,");
		sql.append("	TRIM(NVL(D_CD_ENGL_DSC,'')) AS D_CD_ENGL_DSC,");
		sql.append("	TRIM(NVL(DEL_TYP      ,'')) AS DEL_TYP      ,");
		sql.append("	TRIM(NVL(FM_TYP       ,'')) AS FM_TYP       ,");
		sql.append("	TRIM(NVL(RGS_PGM_NM   ,'')) AS RGS_PGM_NM   ,");
		sql.append("	TRIM(NVL(RGS_USR_ID   ,'')) AS RGS_USR_ID   ,");
		sql.append("	TO_CHAR(NVL(RGS_DTTM,''),'YYYYMMDDHH24MISS') AS RGS_DTTM,");
		sql.append("	TRIM(NVL(CHG_PGM_NM   ,'')) AS CHG_PGM_NM   ,");
		sql.append("	TRIM(NVL(CHG_USR_ID   ,'')) AS CHG_USR_ID   ,");
		sql.append("	TO_CHAR(NVL(CHG_DTTM,''),'YYYYMMDDHH24MISS') AS CHG_DTTM,");
		sql.append("	TRIM(NVL(CHG_TMS      ,'')) AS CHG_TMS      ,");
		sql.append("	TRIM(NVL(CHG_DTTM    ,'')) AS CHG_DTTM    ,");
		sql.append("	TRIM(NVL(CHG_TMS     ,'')) AS CHG_TMS ");
		sql.append("	FROM DCAT");
		sql.append("	WHERE DEL_TYP <>1");
		sql.append("	AND FM_TYP <> 6");
		sql.append("	AND DCAT_CD LIKE "+getString("GCS_CD")+"");
		sql.append("	AND ROWNUM <"+((getString("MAX_KENSU").equals(""))?" is null ":"=")+getString("MAX_KENSU")+"  ");
		sql.append("	ORDER BY DCAT_CD");
		sql.append("	");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_DCAT04_1(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	TRIM(NVL(DCAT_CD      ,'')) AS DCAT_CD      ,");
		sql.append("	TRIM(NVL(APL_BDT      ,'')) AS APL_BDT      ,");
		sql.append("	TRIM(NVL(APL_EDT      ,'')) AS APL_EDT      ,");
		sql.append("	TRIM(NVL(APL_DVSN_CD  ,'')) AS APL_DVSN_CD  ,");
		sql.append("	TRIM(NVL(GCAT_CD      ,'')) AS GCAT_CD      ,");
		sql.append("	TRIM(NVL(D_CD_ENGL_NM ,'')) AS D_CD_ENGL_NM ,");
		sql.append("	TRIM(NVL(D_CD_ENGL_DSC,'')) AS D_CD_ENGL_DSC,");
		sql.append("	TRIM(NVL(DEL_TYP      ,'')) AS DEL_TYP      ,");
		sql.append("	TRIM(NVL(FM_TYP       ,'')) AS FM_TYP       ,");
		sql.append("	TRIM(NVL(RGS_PGM_NM   ,'')) AS RGS_PGM_NM   ,");
		sql.append("	TRIM(NVL(RGS_USR_ID   ,'')) AS RGS_USR_ID   ,");
		sql.append("	TO_CHAR(NVL(RGS_DTTM,''),'YYYYMMDDHH24MISS') AS RGS_DTTM,");
		sql.append("	TRIM(NVL(CHG_PGM_NM   ,'')) AS CHG_PGM_NM   ,");
		sql.append("	TRIM(NVL(CHG_USR_ID   ,'')) AS CHG_USR_ID   ,");
		sql.append("	TO_CHAR(NVL(CHG_DTTM,''),'YYYYMMDDHH24MISS') AS CHG_DTTM,");
		sql.append("	TRIM(NVL(CHG_TMS      ,'')) AS CHG_TMS      ,");
		sql.append("	TRIM(NVL(CHG_DTTM    ,'')) AS CHG_DTTM    ,");
		sql.append("	TRIM(NVL(CHG_TMS     ,'')) AS CHG_TMS ");
		sql.append("	FROM DCAT");
		sql.append("	WHERE DEL_TYP = 1");
		sql.append("	AND FM_TYP <> 6");
		sql.append("	AND ROWNUM <"+((getString("MAX_KENSU").equals(""))?" is null ":"=")+getString("MAX_KENSU")+"  ");
		sql.append("	ORDER BY DCAT_CD");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}

	public SelectResultRset SELECT_DCAT04_2(FrameworkDbCommon db) throws Exception {
		StringBuffer sql = new StringBuffer();
		sql.append("	SELECT");
		sql.append("	TRIM(NVL(DCAT_CD      ,'')) AS DCAT_CD      ,");
		sql.append("	TRIM(NVL(APL_BDT      ,'')) AS APL_BDT      ,");
		sql.append("	TRIM(NVL(APL_EDT      ,'')) AS APL_EDT      ,");
		sql.append("	TRIM(NVL(APL_DVSN_CD  ,'')) AS APL_DVSN_CD  ,");
		sql.append("	TRIM(NVL(GCAT_CD      ,'')) AS GCAT_CD      ,");
		sql.append("	TRIM(NVL(D_CD_ENGL_NM ,'')) AS D_CD_ENGL_NM ,");
		sql.append("	TRIM(NVL(D_CD_ENGL_DSC,'')) AS D_CD_ENGL_DSC,");
		sql.append("	TRIM(NVL(DEL_TYP      ,'')) AS DEL_TYP      ,");
		sql.append("	TRIM(NVL(FM_TYP       ,'')) AS FM_TYP       ,");
		sql.append("	TRIM(NVL(RGS_PGM_NM   ,'')) AS RGS_PGM_NM   ,");
		sql.append("	TRIM(NVL(RGS_USR_ID   ,'')) AS RGS_USR_ID   ,");
		sql.append("	TO_CHAR(NVL(RGS_DTTM,''),'YYYYMMDDHH24MISS') AS RGS_DTTM,");
		sql.append("	TRIM(NVL(CHG_PGM_NM   ,'')) AS CHG_PGM_NM   ,");
		sql.append("	TRIM(NVL(CHG_USR_ID   ,'')) AS CHG_USR_ID   ,");
		sql.append("	TO_CHAR(NVL(CHG_DTTM,''),'YYYYMMDDHH24MISS') AS CHG_DTTM,");
		sql.append("	TRIM(NVL(CHG_TMS      ,'')) AS CHG_TMS      ,");
		sql.append("	TRIM(NVL(CHG_DTTM    ,'')) AS CHG_DTTM    ,");
		sql.append("	TRIM(NVL(CHG_TMS     ,'')) AS CHG_TMS ");
		sql.append("	FROM DCAT");
		sql.append("	WHERE DEL_TYP = 1");
		sql.append("	AND FM_TYP <> 6");
		sql.append("	AND DCAT_CD LIKE "+getString("GCS_CD")+"");
		sql.append("	AND ROWNUM <"+((getString("MAX_KENSU").equals(""))?" is null ":"=")+getString("MAX_KENSU")+"  ");
		sql.append("	ORDER BY DCAT_CD");
		db.setSql(sql.toString());
		lastSql_ =sql.toString();
		SelectResultRset srr = db.executeQuery();
		paramsString     = new Hashtable();
		paramsBigDecimal = new Hashtable();
		paramsFree       = new Hashtable();

		return srr;
	}


	public void setSYS_DATE(String value){
		if(value==null) {
			paramsString.remove("SYS_DATE");
			return;
		}
		paramsString.put("SYS_DATE",value);
	}


	public void setMAX_KENSU(String value){
		if(value==null) {
			paramsString.remove("MAX_KENSU");
			return;
		}
		paramsString.put("MAX_KENSU",value);
	}


	public void setGCS_CD(String value){
		if(value==null) {
			paramsString.remove("GCS_CD");
			return;
		}
		paramsString.put("GCS_CD",value);
	}


}
